(function (cjs, an){
	var p; // shortcut to reference prototypes
	//主文档类
	(lib.Main=function(){
		var txt=new cjs.Text("Switch开关","20px Arial","black");
		txt.parent=this;
		this.addChild(txt);
		//
		var _switch = new ascainiao.Switch();
		_switch.y=30;
		_switch.parent=this;
		this.addChild(_switch);
		_switch.on('change',function(e){
			_switch.check=e.data.check;
		},null,false);
		//
		var txt1=new cjs.Text("Radio单选框","20px Arial","black");
		txt1.parent=this;
		txt1.setTransform(0,60);
		this.addChild(txt1);
		//
		var _radio=new ascainiao.Radio();
		_radio.text="HelloWorld";
		_radio.setTransform(0,90);
		_radio.parent=this;
		this.addChild(_radio);
		//
		var txt2=new cjs.Text("Radio单选组合","20px Arial","black");
		txt2.parent=this;
		txt2.setTransform(0,120);
		this.addChild(txt2);
		//
		var _radio0=new ascainiao.Radio();
		_radio0.text="A";
		_radio0.setTransform(0,150);
		_radio0.parent=this;
		this.addChild(_radio0);
		var _radio1=new ascainiao.Radio();
		_radio1.text="B";
		_radio1.setTransform(50,150);
		_radio1.parent=this;
		this.addChild(_radio1);
		var _radio2=new ascainiao.Radio();
		_radio2.text="C";
		_radio2.setTransform(100,150);
		_radio2.parent=this;
		this.addChild(_radio2);
		var _radio3=new ascainiao.Radio();
		_radio3.text="D";
		_radio3.setTransform(150,150);
		_radio3.parent=this;
		this.addChild(_radio3);
		//
		var radio_group=new ascainiao.RadioGroup(_radio0,_radio1,_radio2,_radio3);
		radio_group.on('change',function(e){
			//console.log(e.data);
			radio_group.selectIndex=e.data.index;
		},null,false);
		
		//
		var txt3=new cjs.Text("InputNumber数字输入框","20px Arial","black");
		txt3.parent=this;
		txt3.setTransform(0,200);
		this.addChild(txt3);
		
		var _input_number=new ascainiao.InputNumber();
		_input_number.parent=this;
		_input_number.setTransform(0,230);
		this.addChild(_input_number);
		_input_number.on('change',function(e){
			//console.log(e);
			_input_number.value=e.data.value;
		},null,false);
		
		//
		var txt4=new cjs.Text("自由变换框","20px Arial","black");
		txt4.parent=this;
		txt4.setTransform(0,280);
		this.addChild(txt4);
		
		var tbox=new ascainiao.TransformBox();
		tbox.parent=this;
		tbox.axis=true;
		tbox.setTransform(100,320);
		this.addChild(tbox);
		tbox.on('change',function(e){
			console.log(e.data);
		},null,false);
		
	}).prototype =p= new cjs.Container();
	
})(createjs = createjs||{}, AdobeAn = AdobeAn||{});